package com.app.conf;


import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootConfiguration
public class SpringMvcConfigurationInitializer implements WebMvcConfigurer {


    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/file/**").addResourceLocations("file:" + "/home/jiuye/upload/","file:C:/upload/91885/");
        registry.addResourceHandler("/template/**").addResourceLocations("file:C:/upload/91885/template/","file:/home/jiuye/upload/template/");
        registry.addResourceHandler("/file/**").addResourceLocations("file:" + "/home/jiuye/upload/","file:/home/jiuye/upload/91885/");
//        registry.addResourceHandler("/file/**").addResourceLocations("file:" + "C:/upload/");
    }
}

